<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        {{time | filtTime}}
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
  let sb=new Vue({
    el:"#app",
    data:{
        time:new Date().getTime()
    },
    filters: {
        filtTime(val){
            console.log(val);
            let y=val.getFullYear();
            let m=val.getMonth()+1;
            let d=val.getDate()
            return `${y}年${m}月${d}日`
        }
    }
  })
</script>
</html>